<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible"content="IE=edge">
<meta name="viewport"content="width=device-width,initial-scale=1.0">
<title>生命周期</title><seript sr=https://cdn.bootedn.net/ajax/1ibs/vue/3.2.40/vue.qlobal.js"></script></head>
<body>
<div fd="app">
<p ref="pRef">(fmessage}F</p><button @click="message  '尚硅谷可以提供优质的互联网技术培训'">更新内容</button>
</div>
<script>
const
createApp
-Vue
const app-createApp(
data()(
return (
message:'欢迎来到尚硅谷*,
,
beforeCreate()(
console.1og('beforeCreate',this.message,this.Srefs.pRef)
1,ereated()(
console.1og('created',this.message,this.Srefs.pRef)
,
beforeMount(O(
console.log('beforeMount',this.message,this.Srefs.pRef)
),mounted()(
console.1og('mounted',this,message,this.Srefs.pRef)
,
beforeupdate()(
console.1og('beforeUpdate')
debugger;
,updated((
console.log('updated')
,beforeUnmount0
console.log('beforeUnmount',this.Srefs.pRef)
debugger;
,
unmountedo(
console.log('unmounted',this.Srefs.pRef)
)
app.mount('fapp');
setTimeout(0>
app.unmount(O);,5000):
</script>
</script>
</body>
</html>
